//引入项目中的全局组件
import SvgIcon from './SvgIcon/index.vue';

import  Category  from './Category/index.vue';
//引入element plus提供的全部图标组件
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
//全局对象
const allGlobalComponent:any={SvgIcon,Category}
//对外暴露插件对象
export default {
    install(app: any) {
        Object.keys(allGlobalComponent).forEach((key: string) => {
            app.component(key, allGlobalComponent[key]);
        })
        // 将element plus提供的图标注册到全局组件中
        for (const [key , component] of Object.entries(ElementPlusIconsVue) ) {
            app.component(key,component)
        }
    }
}